package year2020.month101112;

import java.net.InetAddress;

public class HostTest {

    public static void main(String[] args) throws Exception{
        InetAddress localHost = InetAddress.getLocalHost();
        System.out.println(localHost.getHostAddress());
        System.out.println(localHost.getHostName());
        System.out.println("=======================");
        System.out.println(localHost.getAddress().toString());
        System.out.println(localHost.getCanonicalHostName());
    }

}
